Download current language terms first and then the rest in async way #2361
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
📌 References
🎩 What is the goal?
Optimize the time of splash activity is showing until navigate to the login activity
⚙️ branches
app:
Origin: feature-optimize_the_download_of_languages_time_in_splash_activity Target: v1.4_connect
📝 How is it being implemented?
I added a language parameter to DownloadLanguageTranslationUseCase and first download terms of the current language and then download rest languages terms in an async way.
Note: According to tests on my emulator, the navigation from splash activity to login activity is reduced over 10-15 seg approximately. For poor connections, the improvement can be bigger.
The architecture corresponds to this process has bad practices, I have created a new issue to refactor in the future. #2360
💥 How can it be tested?
Use case 1: Remove current app, open Logcat and execute. Read traces and confirm that during splash activity visualization only downloads current language and when to navigate to login activity in an async way the rest of languages terms is downloading.
💾 Requires DB migration?
🎨 UI changes?